#ifndef WORKSPACEWIDGET_H
#define WORKSPACEWIDGET_H

#include <QTabWidget>
#include <QTextEdit>
#include "src/gui/qt/graphicswidget.h"
#include "src/core/generic/translator.h"

class WorkspaceWidget : public QTabWidget, public ItemWidget
{
  Q_OBJECT
public:
  explicit WorkspaceWidget(int wspId, QWidget *parent = 0);

  virtual void update() { graphicsWidget->update(); }
  virtual void setPolygonMode(PolygonMode mode = Fill) { graphicsWidget->setPolygonMode(mode); }
  virtual void setLineWidth(const float width = 1.0) { graphicsWidget->setLineWidth(width); }
  virtual void setPointSize(const float size = 1.0) { graphicsWidget->setPointSize(size); }
  virtual void startList(ItemWidget::Lists l) { graphicsWidget->startList(l); }
  virtual void endList() { graphicsWidget->endList(); }

  virtual void drawSphere(const Vector3& center, const float radius, const Material& mat, const int detail = 5)
  {
    graphicsWidget->drawSphere(center, radius, mat, detail);
  }
  virtual void drawCylinder(const Vector3& from, const Vector3& to, const float radiusFrom, const float radiusTo, const Material& mat, const int detail = 5 )
  {
    graphicsWidget->drawCylinder(from, to, radiusFrom, radiusTo, mat, detail);
  }
  virtual void drawCone(const Vector3& from, const Vector3& to, const float radius, const Material& mat, const int detail = 5)
  {
    graphicsWidget->drawCone(from, to, radius, mat, detail);
  }
  virtual void drawParallelepiped(const Vector3& vertex, const Vector3& a, const Vector3& b, const Vector3& c, const Material& mat )
  {
    graphicsWidget->drawParallelepiped(vertex, a, b, c, mat);
  }

signals:

public slots:
private:
  int wspId;
  GraphicsWidget *graphicsWidget;
};

#endif // WORKSPACEWIDGET_H
